#include"../include/main.h"

struct linkedlist
{
	char fName[50];
	struct fileDescriptor *fd;
	struct linkedlist *nextNode;
};



		#define Success 1
	#define Failure 0
	
	struct node1 {
		char locationPath[100];
		struct fileDescriptor *filefd;
		struct node1* left;
		struct node1* right;
		struct node1* parent;
	};
	
	struct node1* root1;
        int bstrootcreated;
	struct fileDescriptor filefd;
	void insertBst(struct fileDescriptor *data );
	void inorder(struct node1 *t);
	void displayList();
	int searchBst(char *data);
	//struct fileDescriptor *  searchBst(char *data);
	struct node1* searchBstRec(struct node1 *t,char *data);
	void transplantTree(struct node1 *delNode,struct node1 *delNodeChild);
	void deleteElm(struct node1 *t,char *data);
	struct fileDescriptor * searchBstfd(char *data);
	void inorder_deletion(struct node1 *t);
	void flushBst();

//temp
	int updateDataFile(char location[],char data[]);
	
